g2poly
A small library to handle polynomials of degree < 64 over the finite field GF(2).
The main motivation for this library is generating finite fields of the form GF(2p). Elements of GF(2p) can be expressed as polynomials over GF(2) with degree < p. These finite fields are used in cryptographic algorithms as well as error detecting / correcting codes.
Example
use g2poly;
let a = G2Poly;
assert_eq!;
let b = G2Poly;
assert_eq!;
// Since products could overflow in u64, the product is defined as a u128
assert_eq!;
// This can be reduced using another polynomial
let s = a * a % G2Poly;
assert_eq!;
License
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.